From 60f3ee78cc53f4078e893baa66731f22b635ccc6 Mon Sep 17 00:00:00 2001 From: Henrik Enberg Date: Wed, 18 Jan 2006 11:47:19 +0000 Subject: [PATCH] (rmail-summary-get-new-mail): Only call `rmail-summary-goto-msg' if no new mail was found. --- lisp/mail/rmailsum.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index d95a4201b7f..3bc50c2fd11 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -1271,11 +1271,14 @@ argument says to read a file name and use that file as the inbox." (interactive (list (if current-prefix-arg (read-file-name "Get new mail from file: ")))) - (let (current-message) + (let (current-message new-mail) (with-current-buffer rmail-buffer - (rmail-get-new-mail file-name) - (setq current-message rmail-current-message)) - (rmail-summary-goto-msg current-message nil t))) + (setq new-mail (rmail-get-new-mail file-name) + current-message rmail-current-message)) + ;; If new mail was found, display of the correct message was + ;; done elsewhere. + (unless new-mail + (rmail-summary-goto-msg current-message nil t)))) (defun rmail-summary-input (filename) "Run Rmail on file FILENAME." -- 2.30.2